The usage of light-emitting diodes (LEDs) to provide illumination is increasing rapidly as the costs of LEDs decrease and the endurances of the LEDs increase to cause the overall effective cost of operating LED lighting products to be lower than incandescent lamps and fluorescent lamps providing equivalent illumination. A typical LED driver is a switching power supply that uses a DC-DC converter to regulate the LED current. The components required for a switching power supply are costly. To avoid using a switching power supply, an LED driver that operates directly from the AC input would be desirable. Such a device would be compact and low cost; however, heretofore, LED drivers operating directly from the AC input have required complicated current control circuits. Also, such LED drivers have not effectively solved the problem of turn-on inrush current and overvoltage surges, which can damage the LEDs.